<template>
    <view class="privacyAgreement">
		<view class="user--list i-card" v-for="(item, index) in agreement_list" :key="index" @click="goDetails(item.id)">
			<view class="user--item">
				<view>
					 <!-- <image class="user-item-image" src="/static/user/privacyPolicy.png" mode="scaleToFill"></image> -->
					<text>{{item.title}}</text>
				</view>
				<uni-icons type="right" size="16" class="user--icon-s"></uni-icons>
			</view>
		</view>
	</view>
</template>

<script>
  import * as UserApi from '@/api/user'
  export default {
    data() {
      return {
    	agreement_list: [], ///协议列表
      }
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {
    
    },
	/**
	 * 生命周期函数--监听页面显示
	 */
	onShow() {
	  // 协议列表
	  this.getAgreementList()
	},

    methods: {
		//协议列表
		getAgreementList: function() {
			const app = this
			UserApi.agreementList({})
		      .then(result => {
		        app.agreement_list = result.data
		      })
		      .catch(err => {
		      })
		},
      goDetails: function(id) {
		  this.$navTo('pages/user/privacyAgreement/agreementDetails', { id })
	  },
    }
  }
</script>

<style lang="scss" scoped>
 .privacyAgreement{
	 // 通栏卡片
	 .i-card {
	   background: #fff;
	   padding: 24rpx 44rpx 24rpx 44rpx;
	   width: 95%;
	   // box-shadow: 0 1rpx 5rpx 0px rgba(0, 0, 0, 0.05);
	   margin: 0 auto 20rpx auto;
	   border-radius: 16rpx;
	 }
	 .user--list{
	 	 margin-top: 30rpx;
	 	 .user--item{
	 		 display: flex;
	 		 justify-content: space-between;
	 		 align-items: center;
	 		 color: #747474;
	 		 font-size: 30rpx;
	 		 .user-item-image{
	 			 width:46rpx;
	 			 height:46rpx;
	 			 vertical-align: bottom;
	 			 margin-right: 30rpx;
	 		 }
	 	 }
	 	 .user--icon-s{
	 		 color: #efefef;
	 	 }
	 }
 }
</style>